package com.remenote.remenoteback.entity.doo;

import com.fasterxml.jackson.annotation.JsonFormat;
import jakarta.persistence.*;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import org.springframework.data.annotation.CreatedBy;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedBy;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import java.util.Date;

/**
 * @BelongsProject: remenote-back
 * @BelongsPackage: com.remenote.remenoteback.entity
 * @Author: 23392
 * @CreateTime: 2024-03-16  20:39
 * @Description: TODO
 * @Version: 1.0
 */
@Getter
@Setter
@Entity
@Accessors(chain = true)
@Table(name="COMMENT")
@EntityListeners(AuditingEntityListener.class)
public class CommentDo {
    private String tenantId ;
    private Integer revision ;
    @CreatedBy
    private String createdBy ;
    @CreatedDate
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createdTime ;
    @LastModifiedBy
    private String updatedBy ;
    @LastModifiedDate
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updatedTime ;
    @Id
    @GeneratedValue
    private Integer id ;
    private String username;
    private String publisher ;
    private String notebookName ;
    private String noteTitle;
    private String commentContent ;
    private Boolean isDelete=false;
}
